package cc.mrbird.febs.common.validator;

import cc.mrbird.febs.common.annotation.NotBlank;
import com.google.common.collect.Lists;
import com.wuwenze.poi.validator.Validator;
import org.apache.commons.lang3.StringUtils;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.util.List;

/**
 * @author : wx
 * @version : 1
 * @date : 2019/9/24 16:22
 */
public class NameExcelValidator implements Validator {
    @Override
    public String valid(Object o) {
        String username = (String) o;
        if (username.length() > 20) {
            return "用户名不能超过20个字符。";
        }
        return null;
    }
}